<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <div v-once>
        <h1>{{message}}</h1>
        <h1>{{count}}</h1>
    </div>
    <button @click="change">change</button>
</div>
<script src="../../JavaScript/vue.js"></script>
<script>
    /*
    v-once指令：仅渲染元素和组件一次，并跳过之后的更新。
    * */
    const app = Vue.createApp({
        data() {
            return {
                message: "hello vue",
                count: 0
            }
        },
        methods: {
            change() {
                this.count++
                this.message = "hello react"
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>